ACTUALLY USED BY GAMES

drawObj()
onLoad()		defined by the game
scroll()
width
height
x
y

- games add -
MAP.UNDERLAY  at 1
MAP.SPRITES  at 11
MAP.OVERLAY  at 101



____________________
MINIMUM INTERFACE

- minimum for game -
drawMap()
	decompressMapData()
scroll()
collision()	???

- minimum for editor -
compressMapData()
decompressMapData()
drawMap() (also acts as redrawMap()
updateTile()



____________________
MINIMUM FUNCTIONALITY

compressMapData()
	(add-on code)
	convert collisionData from 2D array to warp-around string of numbers
	convert [layer][x][y]{ c, x, y } data from 3D array of objects into an array of wrap-around "cxy" values, encoded as a 3-digit base-36 string (one for each tile)

decompressMapData()
	(add-on code)
	convert collisionData from wrap-around string of numbers into a 2D array of numbers
	convert tileData from wrap-around array of 3-digit base-36 "cxy" tiles, into [layer][x][y]{ c, x, y } 3D array of objects. Each object represents one tile with individual c,x,y variables.	"c" is an array index referring to a chipset.

drawMap() (also acts as redrawMap()
	remove extra layers
	optionally resize existing layer bitmaps
	if changed, load new chipsets, re-organize existing ones if needed
	create new layers if needed
	wait for pending chipsets, if any...
	... draw all tiles

scroll()
	(add-on code)
	Use old scrolling code

collision()
	(add-on code)
	Use old collision code
	Use same data format
	Use a variable named "collision_array" to reference the data stored at data.collision

updateTile()
	x, y, layer, "cxy" value
	copy tile from chipset specified by "cxy" value
	paste tile to bitmap specified by "layer" at location "x,y"